package com.cq.hd.common.enums.biz;

import lombok.Getter;

/**
 * @description: 未满员是否自动退款:1-是，2-否
 * @author: mYunYu
 * @date: 2021/8/23 14:28
 * @version: v1.0
 */
public enum NoFullAutoRefundStateEnum {

    YES(1, "是"),
    NO(2, "否"),
    ;

    @Getter
    private final Integer value;

    @Getter
    private final String name;

    NoFullAutoRefundStateEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static NoFullAutoRefundStateEnum typeOf(Integer value) {
        NoFullAutoRefundStateEnum[] values = NoFullAutoRefundStateEnum.values();
        for (NoFullAutoRefundStateEnum v : values) {
            if (v.value.equals(value)) {
                return v;
            }
        }
        return null;
    }

    public static NoFullAutoRefundStateEnum typeOf(String name) {
        NoFullAutoRefundStateEnum[] values = NoFullAutoRefundStateEnum.values();
        for (NoFullAutoRefundStateEnum v : values) {
            if (v.name.equals(name)) {
                return v;
            }
        }
        return null;
    }

}
